import Vue from "vue";
import VueRouter from "vue-router";
import Recommend from "../pages/Recommend/Recommend.vue";
import Search from "../pages/Search/Search.vue";
import Singer from "../pages/Singer/Singer.vue";
import Souso from "../pages/Souso/Souso.vue";
import Uert from "../pages/Uert/Uert.vue";
import Fangda from "../pages/Fangda/Fangda.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/recommend",
    component: Recommend,
  },
  {
    path: "/search",
    component: Search,
  },
  {
    path: "/singer",
    component: Singer,
  },
  {
    path: "/souso",
    component: Souso,
  },
  {
    path: "/uert",
    component: Uert,
  },
  {
    path: "/fangda/:mid",
    component: Fangda,
  },
  {
    path: "/",
    redirect: "/recommend",
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
